package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

/**
 * 锦诚
 */
public class JinChengUtil {


    public static Integer getshebao(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return 1;
        }else if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb002.getValue(), shebao)) {
            return 2;
        }
        return 3;
    }
    public static Integer getxueli(String xueli) {
        if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl002.getValue(), xueli)) {
            return 4;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl003.getValue(), xueli)) {
            return 3;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl004.getValue(), xueli)) {
            return 2;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl002.getValue(), xueli)) {
            return 1;
        }
        return 5;
    }


    public static Integer getGjj(String gongjijin) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gongjijin)) {
            return 1;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj002.getValue(), gongjijin)) {
            return 2;
        }
        return 3;
    }

    public static Integer getyuqi(String yuqi) {
        if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq001.getValue(), yuqi)) {
            return 1303;
        }  else if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq002.getValue(), yuqi)) {
            return 1302;
        }  else if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq003.getValue(), yuqi)) {
            return 1301;
        }
        return 1300;
    }


    public static Integer getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return 1;
        }
        return 2;
    }


    public static Integer getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)) {
            return 1;
        }
        return 2;
    }


    public static Integer getbaodan(String baodan) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baodan)) {
            return 1;
        }
        return 2;
    }


    public static Integer getloan(String loan) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loan)) {
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loan)) {
            return 5;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loan)) {
            return 10;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loan)) {
            return 15;
        }
        return 20;

    }

    public static Integer getGongzuo(String gongzuo) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz001.getValue(), gongzuo)) {
            return 2;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz002.getValue(), gongzuo)) {
            return 4;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz003.getValue(), gongzuo)) {
            return 1;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz004.getValue(), gongzuo)) {
            return 10;
        }
        return 99;

    }


    public static Integer getZhimaScore(String zhima) {
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm005.getValue(), zhima)) {
            return 4;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm004.getValue(), zhima)) {
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm003.getValue(), zhima)) {
            return 1;
        }
        return 5;
    }


}
